﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using AutoFacUtils;
using IShopService3 = CashFlow.Web.Areas.SystemManage.Service.IShopService;

namespace CashFlow.Web.Areas.SystemManage.Validator
{
    public class CommonValidator
    {
        private static IShopService3 GetShopService3() { return AutoFacHelper.Get<IShopService3>(); }

        public static bool IsShopManagerUserIdValid(int shopManagerUserId)
        {
            var service3 = GetShopService3();
            var count = service3.Count(x => x.ShopManagerUserId == shopManagerUserId);
            return count > 0;
        }
    }
}